import {baseAjax} from '../baseAjax'

// 企业字典表配置分页
export function dataSettingPaging (data, successHandle, failHandle) {
  baseAjax('/ent/dict/value/paging', data, 'post', successHandle, failHandle)
}

// 修改字典表值
export function updateDictValue (data, successHandle, errorHandle) {
  baseAjax('/ent/dict/value', data, 'put', successHandle, errorHandle)
}

// 字典表启用
export function turnOnDictValue (idList, successHandle, errorHandle) {
  let url = '/ent/dict/value/enable/' + idList
  baseAjax(url, {}, 'put', successHandle, errorHandle)
}

// 字典表禁用
export function turnOffDictValue (idList, successHandle, errorHandle) {
  let url = '/ent/dict/value/disable/' + idList
  baseAjax(url, {}, 'put', successHandle, errorHandle)
}

// 字典表值新增
export function saveDictValue (data, successHandle, errorHandle) {
  baseAjax('/ent/dict/value/save', data, 'post', successHandle, errorHandle)
}
// 字典表列表获取
export function getDictSettingList (successHandle, errorHandle) {
  baseAjax('/ent/dict/list', {}, 'get', successHandle, errorHandle)
}
